package com.wiscamp.ninechapters.panels.application.command;

import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;

/**
 * DTO for storing a user's credentials.
 */
public class LoginCommand {

    private long applicationId;

    @NotNull
    @Size(min = 1, max = 50)
    private String userCode;

    @NotNull
    @Size(min = 4, max = 100)
    private String password;

    private Boolean rememberMe;

    public String getUserCode() {
        return userCode;
    }

    public void setApplicationId(long appId) {
        this.applicationId = appId;
    }

    public long getApplicationId() {
        return this.applicationId;
    }

    public void setUserCode(String userCode) {
        this.userCode = userCode;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public Boolean isRememberMe() {
        return rememberMe;
    }

    public void setRememberMe(Boolean rememberMe) {
        this.rememberMe = rememberMe;
    }

    @Override
    public String toString() {
        return "LoginCommand{" +
                "applicationId='" + applicationId + '\'' +
                "userCode='" + userCode + '\'' +
                ", rememberMe=" + rememberMe +
                '}';
    }
}
